<script setup>
import { useRouter } from 'vue-router';
const router = useRouter();
const goToRegister = () => {
  router.push('/register');
};
</script>

<template>
  <div class="home-container">
    <h1>ai智能商城</h1>
    <div class="login-box">
      <input type="text" placeholder="用户名" />
      <input type="password" placeholder="密码" />
      <button>登录</button>
    <button @click="goToRegister">注册</button>
    </div>
    
  </div>
</template>

<style scoped>
  .home-container {
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
  }
  h1 {
    text-align: center;
    color: white;
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  }
  .login-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 300px;
  }
  .login-box input {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
  }
  .login-box button {
    padding: 0.5rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
  }
  .register-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 300px;
    margin-top: 1rem;
  }
  .register-box input {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
  }
  .register-box button {
    padding: 0.5rem;
    background: #764ba2;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
  }
</style>